<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="index.css">
    <script src="../vue.js"></script>
</head>
<body>
    <div id="app">
        <h2>学员信息表</h2>
        <p>姓名：<input type="text" v-model="name"></p>
        <p>年龄：<input type="text" v-model="age"></p>
        <p>性别：<input type="text" v-model="sex"></p>
        <p>省份：<input type="text" v-model="sheng" placeholder="可以为空"></p>
        <button @click="add()">添加</button>
        <table>
            <tr>
                <th>姓名</th>
                <th>年龄</th>
                <th>性别</th>
                <th>省份</th>
                <th>操作</th>
            </tr>
            <tr v-for="(item,index) in suts">
                <td>{{item.name}}</td>
                <td>{{item.age}}</td>
                <td>{{item.sex}}</td>
                <td>{{item.sheng}}</td>
                <td class="del" @click="del(index)">删除</td>
            </tr>
        </table>
    </div>
    <script src="index.js"></script>
</body>
</html>